package com.xbongbong.pro.statistic.pojo;

import com.alibaba.fastjson.JSONArray;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;

/**
 * @ClassName dataWarningFieldAttrPojo
 * @Description 数据预警字段pojo
 * @Author mengna.Deng
 * @Date 2021/4/16 19:03
 * @Version 1.0
 */
@Getter
@Setter
@ToString
public class DataWarningFieldAttrPojo implements Serializable {
    private static final long serialVersionUID = -1L;

    /**
     * id,前端需要一个唯一值，这个由attr和formId拼接
     */
    private String id;
    /**
     * 字段别名
     */
    private String attr;
    /**
     * 字段名称
     */
    private String attrName;
    /**
     * 字段类型
     */
    private Integer fieldType;
    /**
     * 是否允许可见 1:允许 0：不允许
     */
    private Integer visible;
    /**
     * formId
     */
    private Long formId;

    private Integer businessType;

    /**
     * 前端需要
     */
    private String labelName;

    /**
     * 高级计算
     * @see com.xbongbong.pro.statistic.enums.AdvancedComputingFirstEnum,com.xbongbong.pro.statistic.enums.AdvancedComputingSecondEnum
     */
    private JSONArray advancedComputing;

    private String aggType;

    public DataWarningFieldAttrPojo() {
        // 默认可见
        this.visible = 1;
    }

    public DataWarningFieldAttrPojo(String id, String attr, String attrName, Integer fieldType, Integer visible,Long formId,Integer businessType) {
        this.id = id;
        this.attr = attr;
        this.attrName = attrName;
        this.fieldType = fieldType;
        this.visible = visible;
        this.formId = formId;
        this.businessType = businessType;
    }
}
